import request from '@/utils/request'
// 获取员工信息
export function departments() {
  return request({
    url: '/sys/user/simple',
    
  })
}

// 获取员工列表
export function getDepartments(page,size) {
  return request({
    url: '/sys/user',
    params:{page,size}
  })
}

// 新增员工列表
export function addDepartments(data) {
  return request({
    url: '/sys/user',
    method:'post',
    data
  })
}

// 删除员工列表
export function delDepartments(id) {
  return request({
    url: `/sys/user/${id}`,
    method:'delete',
  })
}

// 批量导入员工列表
export function plDepartments(data) {
  return request({
    url: `/sys/user/batch`,
    method:'post',
    data
  })
}
// 保存员工基本信息
export function Departments(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method:'put',
    data
  })
}